package day02;

import java.util.Iterator;
import java.util.LinkedHashSet;

/*
 *文件名: LinkedHashSetDemo
 *创建者:
 *创建时间:2025/5/20 14:58
 *描述:
 */
public class LinkedHashSetDemo {
    public static void main(String[] args) {
        LinkedHashSet<String> set = new LinkedHashSet<>();

        set.add("a");
        set.add("b");
        set.add("c");
        set.add("d");

        Iterator<String> iterator = set.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
